home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / overview / dtscpluslibrary / sources / soundclasstest.cp < prev    next >
Encoding:
Text File  |  2000-09-28  |  1.5 KB  |  56 lines

  1. /*
  2.     File:        SoundClassTest.cp
  3.  
  4.     Contains:    TSound is a simple object that plays sounds     
  5.                   TSound.cp contains the TSound member functions. 
  6.  
  7.  
  8.     Written by: Kent Sandvik    
  9.  
  10.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  11.  
  12.                 You may incorporate this Apple sample source code into your program(s) without
  13.                 restriction. This Apple sample source code has been provided "AS IS" and the
  14.                 responsibility for its operation is yours. You are not permitted to redistribute
  15.                 this Apple sample source code as "Apple sample source code" after having made
  16.                 changes. If you're going to re-distribute the source, we require that you make
  17.                 it clear in the source that the code was descended from Apple sample source
  18.                 code, but that you've made changes.
  19.  
  20.     Change History (most recent first):
  21.                 8/18/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  22.                 
  23.  
  24. */
  25. #ifndef _SOUND_
  26. #include "SoundClass.h"
  27. #endif
  28.  
  29. // Simple test that plays sounds using the TSound class.
  30.  
  31. void main(void)
  32. {
  33.     cout << "Start of the TSound test…\n";
  34.  
  35.     cout << "1: A simple test where a sound is played synchronously\n";
  36.  
  37.     TSound mySound("Moof");
  38.  
  39.     mySound.Play();
  40.  
  41.     TSound mySameSound(9000);                    // use the other constructor
  42.     mySameSound.Play();
  43.  
  44.     cout << "End of the TSound test!\n";
  45. }
  46.  
  47.  
  48. // _________________________________________________________________________________________________________ //
  49.  
  50.  
  51. /*    Change History (most recent last):
  52.   No        Init.    Date        Comment
  53.   1            khs        12/21/92    New file
  54.   2            khs        1/14/93        Cleanup
  55. */
  56.